<style lang="stylus" scoped>
bgBlue = linear-gradient(to right, #04befe, #4481eb);

nav {
    width: 100%;
    height: 50px;
    background: bgBlue;

    img {
        display: inline-block;
        float: left;
        width: 25px;
        height: 25px;
        margin: 12px 10px;
    }

    p {
        display: inline-block;
        width: 80%;
        float: left;
        font-size: 18px;
        color: #ffffff;
        text-align: center;
        line-height: 50px;
    }
}
</style>
<template>
    <div>
      <nav>
                <img @click="onClose" src="./imgs/icon-left.png" alt="">
                <p>我的推荐人</p>
        </nav>
         <i-table :columns="columns1" :data="data1"></i-table>
    </div>

</template>
<script>
    import axios from 'axios'
    export default {
        data () {
            return {
                columns1: [
                    {
                        title: '姓名',
                        key: 'username'
                    },
                    {
                        title: '手机号',
                        key: 'phone'
                    },
                    {
                        title: '级别',
                        key: 'level'
                    }
                ],
                data1: []
            }
        },
        mounted(){
          this.getList();
        },
        methods:{
          getList(){
            axios.post('web/api/user/users',{"pageSize":1,"pageNumber":1,"username":this.$store.state.user.superior1}).then(this.getListInfoSucc)
          },
          getListInfoSucc(res){
            console.log("res=",res);
            this.data1 = res.data.date.list
          },
          onClose(){
            this.$router.back(-1)
          }
        }
    }
</script>
